import { Body, Controller, Post } from '@nestjs/common';
import { AuthService } from './auth.service';
import { ClearAuth, ResMessage } from '@libs/common';
import BizException from '@libs/common/dto/biz.exception';
import { LoginUserDto } from './dto/login-user.dto';

@ClearAuth()
@Controller('auth')
export class AuthController {
  
  constructor(private readonly authService: AuthService) {}
  
  @Post('login')
  async login(@Body() loginUserDto: LoginUserDto) {
    console.log(loginUserDto)
    return await this.authService.login(loginUserDto)
  }
}
